﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

public partial class _Default : PageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //登录成功,设置该会员是否有操作 FCKeditor 图片上传的功能
        //if (_Customer.Competences.IsOwnedCompetences(Competences.Administrator) || _Customer.CustomerTypeID == 0)
        //{
            Session["IsAuthorized"] = true;
        //}

        //总站与子站
        if (_Customer.Competences.IsOwnedCompetences(Competences.Administrator) || _Customer.CustomerTypeID == 0)
        {
            SiteParent.Visible = true;

            if (_Customer.Competences.CompetencesList == "")
            {
                Response.Redirect("index.aspx", true);
            }
        }
        else
        {
            SiteChild.Visible = true;

            if (_Customer.Competences.CompetencesList == "")
            {
                Response.Redirect("indexChild.aspx", true);
            }
        }

        this.lbCompanyName.Text = PublicFunction.GetOptionsAsString("公司名称");
    }

    #region Web 窗体设计器生成的代码

    override protected void OnInit(EventArgs e)
    {
        isRequestLogin = true;                                  //是否需要登录
        RequestLoginPage = "Index.aspx";                        //获取决对Url
        isAtFramePageLogin = true;                              //是框架页

        base.OnInit(e);
    }

    #endregion

    protected void lbExit_Click(object sender, EventArgs e)
    {
        this.Session.Clear();
        Response.Write("<script>window.opener=null;window.close()</script>");
    }
}
